// 电子信息化接口
import request from '@/utils/request' // 引入封装的axios
import { commonBaseUrl } from '@/utils' // 引入封装的axios
const moduleName = commonBaseUrl('A') // 引入封装的axios

// 非自研给信息化验收提供的接口
export function nonSelfResearchAcceptance(data) {
    return request({
        url: moduleName + `api/signature/v2/genExtAcceptanceDoc`,
        method: 'post',
        data,
        showLoading: true
    })
}
// 供应商确认结果
export function suppierConfirmFlow(taskld, supplierCode) {
    return request({
        url: moduleName + `api/signature/v2/sup/confirm?taskId=${taskld}&supplierCode=${supplierCode}`,
        method: 'post',
        showLoading: true
    })
}
// 流程 下一步校验
export function doNextFlowCheck(data) {
    return request({
        url: moduleName + 'api/attachment/signatures/signNextCheck',
        method: 'post',
        data,
        showLoading: true,
        hideMessage: true // 隐藏消息提示

    })
}
// 电子签章下一步提交
export function confirmcDoNextFlow(data) {
    return request({
        url: moduleName + 'api/attachment/signatures/doNextSignaturesFLow',
        method: 'post',
        data,
        showLoading: true
    })
}
// 电子签章回退提交
export function confirmcDoBackFlow(data) {
    return request({
        url: moduleName + 'api/attachment/signatures/backSignaturesActivity',
        method: 'post',
        data,
        showLoading: true
    })
}
// 电子签章转派提交
export function confirmcDoReassignFlow(data) {
    return request({
        url: moduleName + 'api/attachment/signatures/doReassignSignatures',
        method: 'post',
        data,
        showLoading: true
    })
}

// 表格获取接口
export function getSingareTableInfo(data) {
    return request({
        url: moduleName + 'api/attachment/signatures/queryPrjWorkSummaryInfoList',
        method: 'post',
        data,
        showLoading: true
    })
}
// 更新数据接口
export function upDateSingareTableInfo(data) {
    return request({
        url: moduleName + 'api/attachment/signatures/initSummaryInfoList',
        method: 'post',
        data,
        showLoading: true
    })
}
// 保存接口
export function saveSingareTableInfo(data, operateType) {
    return request({
        url: moduleName + `api/attachment/signatures/saveOrUpdateSummaryInfoList?operateType=${operateType}`,
        method: 'post',
        data,
        showLoading: true
    })
}
// 删除接口
export function deleteSingareTableInfo(data) {
    return request({
        url: moduleName + `api/attachment/signatures/deleteSummaryInfoList`,
        method: 'post',
        data,
        showLoading: true
    })
}
// 下拉框的值
export function getSingareSelectInfo(data, operateType) {
    return request({
        url: moduleName + `api/attachment/signatures/queryComboBoxInfo?operateType=${operateType}`,
        method: 'post',
        data
        // showLoading: true
    })
}
// 根据项目编码、供应商编码、合同编码，自动填充其他信息
export function getSingareProductSelectInfo(data) {
    return request({
        url: moduleName + `api/attachment/signatures/queryPrjSummaryInfo`,
        method: 'post',
        data,
        showLoading: true
    })
}
// 是否允许编辑校验
export function isAllowEdits(data) {
    return request({
        url: moduleName + `api/attachment/signatures/checkIsExistDataForm`,
        method: 'post',
        data,
        showLoading: true,
        hideMessage: true // 隐藏消息提示

    })
}
